using CodePlex.DependencyInjection.ObjectBuilder;
using CodePlex.TfsLibrary;
using CodePlex.TfsLibrary.ClientEngine;

namespace CodePlex.CodePlexClientLibrary
{
    public abstract class NonAuthenticatedCommand : Command
    {
        IAppConfig config;
        ITfsEngine tfsEngine;

        protected IAppConfig Config
        {
            get { return config; }
        }

        protected virtual ITfsEngine Engine
        {
            get { return tfsEngine; }
        }

        [InjectionMethod]
        public void InitializeNonAuthenticatedCommand(ITfsEngine engine,
                                                      IAppConfig appConfig)
        {
            config = appConfig;
            tfsEngine = engine;
        }
    }
}